package edu.sctu.practice.class01.zhangwang.assigns.assign03.question_01;

/**
 * Created by Z_W on 2015/10/22.
 */
public class Rectangle extends GeometricObject {
    public double areas = 0;
    public double perimeters = 0;
    public double width = 0;
    public double height = 0;

    public Rectangle(String color) {
        super(color);
    }

    public Rectangle(String color, double width, double height) {
        super(color);
        this.width = width;
        this.height = height;
    }

    @Override
    public double fingArea() {
        areas = width * height;
        return areas;
    }

    @Override
    public double findPerimeter() {
        perimeters = 2  * (width + height);
        return perimeters;
    }
}
